﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="SearchList.aspx.cs" Inherits="SearchList" Title="搜索列表" %>

<%@ Register TagPrefix="News" TagName="CollegeNewsList" Src="~/WebPartControls/CollegeNewsListControl.ascx" %>
<%@ Register TagPrefix="News" TagName="NoticeList" Src="~/WebPartControls/NoticeListControl.ascx" %>
<%@ Register TagPrefix="News" TagName="PictureNews" Src="~/WebPartControls/PictureNewsControl.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server">

    <tr align="center" valign="top" style="width: 1000px">
        <td>
            <table style="width: 1000px; border: 0px;" cellspacing="0px" cellpadding="0px">
                <tr valign="top">
                    <!--Left-->
                    <td style="width: 30%" valign="top">
                        <table style="width: 100%; border: 0px;" cellspacing="0px" cellpadding="0px">
                            <tr>
                                <td>
                                    <table style="width: 100%; border: 0px;" cellspacing="0px" cellpadding="0px">
                                        <tr>
                                            <td>
                                                <News:PictureNews ID="PictureNews1" runat="server" />
                                            </td>
                                            <td style="width: 1px; background-color: #999999">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="DashedBottomLine" style="height: 10px">
                                                &nbsp;
                                            </td>
                                            <td style="width: 1px; background-color: #999999">
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <table style="width: 100%; border: 0px;" cellspacing="0px" cellpadding="0px">
                                        <tr>
                                            <td align="left">
                                                <News:NoticeList ID="NoticeList1" runat="server" />
                                            </td>
                                            <td style="width: 1px; background-color: #999999">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="DashedBottomLine" style="height: 10px">
                                                &nbsp;
                                            </td>
                                            <td style="width: 1px; background-color: #999999">
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <table style="width: 100%; border: 0px;" cellspacing="0px" cellpadding="0px">
                                        <tr>
                                            <td align="left">
                                                <News:CollegeNewsList ID="CollegeNewsList1" runat="server" />
                                            </td>
                                            <td style="width: 1px; background-color: #999999">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="DashedBottomLine" style="height: 10px">
                                                &nbsp;
                                            </td>
                                            <td style="width: 1px; background-color: #999999">
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <!--NoticeList-->
                    <td style="width: 70%">
                        <table style="width: 100%; border: 0px;" cellspacing="0px" cellpadding="0px">
                            <tr style="width: 100%; height: 20px" align="left">
                                <td>
                                    <table style="width: 100%; border: 0px;" cellspacing="0px" cellpadding="0px">
                                        <tr style="height: 20px" align="left">
                                            <td style="width: 3%">
                                            </td>
                                            <td style="width: 65px" class="Guide">
                                                <label>
                                                    当前位置：</label>
                                            </td>
                                            <td style="width: 90px" class="Guide">
                                                <a href="Default.aspx">滨海学院新闻网</a>
                                            </td>
                                            <td style="width: 10px" class="Guide">
                                                <label>
                                                    ></label>
                                            </td>
                                            
                                            <td class="Guide">
                                                <asp:HyperLink ID="ListHyperLink" runat="server" CssClass="Guide">HyperLink</asp:HyperLink>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr style="width: 100%;" align="center">
                                <td>
                                    <table style="width: 100%; border: 0px;" cellspacing="0px" cellpadding="0px">
                                        <tr>
                                            <td style="width: 5%">
                                            </td>
                                            <td align="left">
                                                <asp:GridView ID="NewsListGridView" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                                    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="0px"
                                                    CellPadding="3" DataKeyNames="News_id,Catalog_id" DataSourceID="NewsSqlDataSource"
                                                    OnSelectedIndexChanging="NewsListGridView_SelectedIndexChanging" 
                                                    PageSize="12" ondatabound="NewsListGridView_DataBound" 
                                                    onrowdatabound="NewsListGridView_RowDataBound">
                                                    <Columns>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <table style="width: 100%; height: 22px; border: 0px;" cellspacing="0px" cellpadding="0px">
                                                                    <tr>
                                                                        <td style="width: 20px">
                                                                            <asp:Image ID="Image1" runat="server" ImageUrl="~/images/NewsIndex.jpg" />
                                                                        </td>
                                                                        <td>
                                                                            <asp:Label ID="News_id" runat="server" Visible="false" Text='<%#DataBinder.Eval(Container.DataItem,"News_id")%>'></asp:Label>
                                                                        </td>
                                                                        <td align="left" style="width: 400px">
                                                                            <asp:LinkButton ID="News_Title" runat="server" CommandName="Select" CssClass="Title"
                                                                                Text='<%#DataBinder.Eval(Container.DataItem,"Title")%>' 
                                                                                ></asp:LinkButton>
                                                                        </td>
                                                                        <td>
                                                                            <asp:Label ID="News_Catalog_id" runat="server" CssClass="Title"
                                                                                Text='<%# DataBinder.Eval(Container.DataItem,"Catalog_id") %>' 
                                                                                Visible="False"></asp:Label>
                                                                        </td>
                                                                         <td align="center" dir="ltr" valign="middle" style="width: 200px" >
                                                                            <asp:Label ID="News_Catalog" runat="server" CssClass="Title"
                                                                                Text='<%# DataBinder.Eval(Container.DataItem,"CatalogName") %>'></asp:Label>
                                                                        </td>
                                                                        <td style="width: 80px">
                                                                            <asp:Label runat="server" ID="Date" CssClass="Title gray" 
                                                                                Text='<%# DataBinder.Eval(Container.DataItem,"Time","{0:d}") %>'></asp:Label>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                                <asp:SqlDataSource ID="NewsSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:NewsConnectionString %>"                    
                                                    SelectCommand="SELECT News.News_id, News.Title, News.Time, NewsToCatalog.Catalog_id, News.isPublished, Catalog.CatalogName FROM News INNER JOIN NewsToCatalog ON News.News_id = NewsToCatalog.News_id INNER JOIN Catalog ON NewsToCatalog.Catalog_id = Catalog.Catalog_id WHERE (News.isPublished = @isPublished) AND (NewsToCatalog.Catalog_id &lt;&gt; 9) ORDER BY News.News_id DESC">
                                                    <SelectParameters>
                                                        <asp:Parameter DefaultValue="1" Name="isPublished" Type="Int32" />
                                                    </SelectParameters>
                                                </asp:SqlDataSource>
                                                <asp:Label ID="FoundCountLabel" runat="server" Text="Label" CssClass="gray"></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</asp:Content>

